<?php
namespace Admin\Service;
//app用户 service
use Admin\Model\UserModel;

class UserService extends BaseService
{

    /**
     * @var UserService
     */
    private static $instance;

    /**
     * Get the instance of UserService.
     * @return UserService
     */
    public static function get()
    {
        if (!self::$instance) {
            self::$instance = new UserService();
        }
        return self::$instance;
    }

    /**
     * @function    deleteAccount  删除
     * @param       $id         int  id
     * @author      zhangle
     * @date        2018-08-02
     * @return      bool
     */
    public function deleteAccount($id){
        return UserModel::get()->deleteAccount($id);
    }


    /**
     * @function    getList     获取所有用户
     * @author      zhangle
     * @date        2018-08-02
     * @return      array
     */
    public function getList(){
        return UserModel::get()->getList();
    }
}